From dd6e0307392ab6b54c2ebce3c3dcb9f6ca704443 Mon Sep 17 00:00:00 2001 From: tsteven4 <13596209+tsteven4@users.noreply.github.com> Date: Wed, 19 Feb 2020 13:35:59 -0700 Subject: [PATCH] extend travis cache expiration date. (#510) --- .travis.yml | 6 +++--- tools/travis_install_linux_local | 8 ++++++++ tools/travis_install_osx | 8 ++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9beed895b..489fc5b7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ language: cpp matrix: include: - os: linux - dist: xenial + dist: bionic sudo: required services: docker compiler: gcc @@ -11,7 +11,7 @@ matrix: - BUILD_TYPE="docker" - DOCKER_IMG="qtio" - os: linux - dist: xenial + dist: bionic sudo: required services: docker compiler: clang @@ -19,7 +19,7 @@ matrix: - BUILD_TYPE="docker" - DOCKER_IMG="qtio" - os: linux - dist: xenial + dist: bionic sudo: required services: docker compiler: gcc diff --git a/tools/travis_install_linux_local b/tools/travis_install_linux_local index 65b5e83b7..82d419881 100755 --- a/tools/travis_install_linux_local +++ b/tools/travis_install_linux_local @@ -38,6 +38,14 @@ if [ -d "${QTDIR}/bin" ]; then echo "Using cached Qt." echo "If you need to clear the cache see" echo "https://docs.travis-ci.com/user/caching/#Fetching-and-storing-caches." + if [ "${TRAVIS_EVENT_TYPE}" = "cron" ]; then + # the cache is being used. modify it to reset expiration date. + date > ${CACHEDIR}/timestamp + fi + if [ -f "${CACHEDIR}/timestamp" ]; then + echo -n "Cache timestamp: " + cat "${CACHEDIR}/timestamp" + fi else rm -fr ${CACHEDIR} mkdir -p ${CACHEDIR} diff --git a/tools/travis_install_osx b/tools/travis_install_osx index 1c7368007..26c4d6b03 100755 --- a/tools/travis_install_osx +++ b/tools/travis_install_osx @@ -38,6 +38,14 @@ if [ -d "${QTDIR}/bin" ]; then echo "Using cached Qt." echo "If you need to clear the cache see" echo "https://docs.travis-ci.com/user/caching/#Fetching-and-storing-caches." + if [ "${TRAVIS_EVENT_TYPE}" = "cron" ]; then + # the cache is being used. modify it to reset expiration date. + date > ${CACHEDIR}/timestamp + fi + if [ -f "${CACHEDIR}/timestamp" ]; then + echo -n "Cache timestamp: " + cat "${CACHEDIR}/timestamp" + fi else rm -fr ${CACHEDIR} mkdir -p ${CACHEDIR} -- 2.30.2